import React from 'react';
import PropTypes from 'prop-types';
import deleteIcon from '@/src/assets/icon/IconC/delete.png';
import edit from '@/src/assets/icon/IconC/edit.png';
import deleteHoverIcon from '@/src/assets/icon/IconC/deleteHover.png';
import editHoverIcon from '@/src/assets/icon/IconC/editHover.png';
import downloadIcon from '@/src/assets/icon/IconC/download.png';
import downloadHoverIcon from '@/src/assets/icon/IconC/downloadHover.png';
import upRegulate from '@/src/assets/icon/IconC/upRegulate.png';
import downRegulate from '@/src/assets/icon/IconC/downRegulate.png';
import packUp from '@/src/assets/icon/IconC/packup.png';
import newly from '@/src/assets/icon/IconC/newly.png';
import cancle from '@/src/assets/icon/IconC/cancle.png';
import save from '@/src/assets/icon/IconC/save.png';
import rateMessage from '@/src/assets/icon/IconC/rateMessage.png';
import rateMessageRightArrow from '@/src/assets/icon/IconC/rateMessageRightArrow.png';
import money from '@/src/assets/icon/IconC/money.png';
import minus from '@/src/assets/icon/IconC/minus.png';
import plus from '@/src/assets/icon/IconC/plus.png';
import info from '@/src/assets/icon/IconC/info.png';
import editIconWarning from '@/src/assets/icon/IconC/editWaring.png';
import delIconWarning from '@/src/assets/icon/IconC/delWaring.png';
import arrow from '@/src/assets/icon/IconC/arrow.png';
import search from '@/src/assets/icon/IconC/search.png';
import accountDisbaled from '@/src/assets/icon/account_disabled.png';
import account from '@/src/assets/icon/account.png';
import deleteDisbaled from '@/src/assets/icon/delete_disabled.png';
import deleteRed from '@/src/assets/icon/delete.png';
import filterHoverIcon from '@/src/assets/icon/icon_filter_hover.png';
import filterIcon from '@/src/assets/icon/icon_filter_normal.png';
import saveIconDisabled from '@/src/assets/icon/save_disabled.png';
import saveIcon from '@/src/assets/icon/save.png';
import toolTipEdit from '@/src/assets/comps/business/toolTipEdit.png';
import downBtn from '@/src/assets/comps/other/contentPackage/downBtn.png';
import play from '@/src/assets/comps/other/contentPackage/play.png';
import playHover from '@/src/assets/comps/other/contentPackage/playHover.png';
import videoBtn from '@/src/assets/comps/other/contentPackage/videoBtn.png';
import doubleDownArrow from '@/src/assets/comps/other/firstHeader/arrow.png';
import titleIcon from '@/src/assets/comps/other/firstHeader/title_icon.png';
import titleIconRed from '@/src/assets/comps/other/firstHeader/title_icon_red.png';
import titleIconDarkBlue from '@/src/assets/comps/other/firstHeader/title_icon_darkBlue.png';
import titleIconTwo from '@/src/assets/comps/other/secondHeader/title_icon_two.png';
import titleIconTwoRed from '@/src/assets/comps/other/secondHeader/title_icon_two_red.png';
import titleIconTwoDarkBlue from '@/src/assets/comps/other/secondHeader/title_icon_two_darkBlue.png';
import titleIconThree from '@/src/assets/comps/other/threeHeader/title_icon_three.png';
import excelIcon from '@/src/assets/comps/other/uploadC/excel.png';
import imageIcon from '@/src/assets/comps/other/uploadC/image.png';
import pdfIcon from '@/src/assets/comps/other/uploadC/pdf.png';
import unknownIcon from '@/src/assets/comps/other/uploadC/unknown.png';
import videoIcon from '@/src/assets/comps/other/uploadC/video.png';
import wordIcon from '@/src/assets/comps/other/uploadC/word.png';
import zipIcon from '@/src/assets/comps/other/uploadC/zip.png';
import downArrow from '@/src/assets/commom/down_arrow.png';
import upArrow from '@/src/assets/commom/up_arrow.png';
import buyIcon from '@/src/assets/commom/buy.png';
import sellIcon from '@/src/assets/commom/sell.png';
import downArrowGreen from '@/src/assets/commom/down_arrow_green.png';
import upArrowRed from '@/src/assets/commom/up_arrow_red.png';
import squareDownArrowSelect from '@/src/assets/busi/assetSplit/down_arrow_select.png';
import squareDownArrow from '@/src/assets/busi/assetSplit/down_arrow.png';
import squareUpArrowSelect from '@/src/assets/busi/assetSplit/up_arrow_select.png';
import squareUpArrow from '@/src/assets/busi/assetSplit/up_arrow.png';
import greater from '@/src/assets/busi/investmentAndDecision/dayu.png';
import less from '@/src/assets/busi/investmentAndDecision/xiaoyu.png';
import leftArrow from '@/src/assets/busi/investmentCalendar/leftNo.png';
import leftArrowSelect from '@/src/assets/busi/investmentCalendar/leftSelect.png';
import rightArrow from '@/src/assets/busi/investmentCalendar/rightNo.png';
import rightArrowSelect from '@/src/assets/busi/investmentCalendar/rightSelect.png';
import deleteBlueTwo from '@/src/assets/busi/MyAttention/delete_blue.png';
import editBlueTwo from '@/src/assets/busi/MyAttention/edit_blue.png';
import addBlue from '@/src/assets/busi/OperatePlatform/menuList/add.png';
import deleteYellow from '@/src/assets/busi/OperatePlatform/menuList/delete.png';
import notice from '@/src/assets/busi/OperatePlatform/notice.png';
import position from '@/src/assets/busi/OperatePlatform/position.png';
import doneBg from '@/src/assets/busi/OperatePlatform/done_bg.png';
import kzzsh from '@/src/assets/busi/OperatePlatform/kzzsh.png';
import xptx from '@/src/assets/busi/OperatePlatform/xptx.png';
import xqtx from '@/src/assets/busi/OperatePlatform/xqtx.png';
import zqyctx from '@/src/assets/busi/OperatePlatform/zqyctx.png';
import liabilityRatio from '@/src/assets/busi/performanceAnalysis/netValueAnalysis2/liability_ratio.png';
import share from '@/src/assets/busi/performanceAnalysis/netValueAnalysis2/share.png';
import value from '@/src/assets/busi/performanceAnalysis/netValueAnalysis2/value.png';
import vsIcon from '@/src/assets/busi/performanceAnalysis/netValueAnalysis2/vs_icon.png';
import goldenOne from '@/src/assets/busi/performanceAnalysis/performanceAnalysis/golden_one.png';
import goldenTwo from '@/src/assets/busi/performanceAnalysis/performanceAnalysis/golden_two.png';
import goldenThree from '@/src/assets/busi/performanceAnalysis/performanceAnalysis/golden_three.png';
import greyOne from '@/src/assets/busi/performanceAnalysis/performanceAnalysis/grey_one.png';
import greyTwo from '@/src/assets/busi/performanceAnalysis/performanceAnalysis/grey_two.png';
import greyThree from '@/src/assets/busi/performanceAnalysis/performanceAnalysis/grey_three.png';
import darkBlue from '@/src/assets/busi/performanceAnalysis/profitOverview/darkBlue.png';
import defaultColor from '@/src/assets/busi/performanceAnalysis/profitOverview/default.png';
import defaultColorSelect from '@/src/assets/busi/performanceAnalysis/profitOverview/default_select.png';
import redColor from '@/src/assets/busi/performanceAnalysis/profitOverview/red.png';
import redColorSelect from '@/src/assets/busi/performanceAnalysis/profitOverview/red_select.png';
import darkBlueSelect from '@/src/assets/busi/performanceAnalysis/profitOverview/darkBlue_select.png';
import inFlow from '@/src/assets/busi/performanceAnalysis/tradeAnalysisNew/inflow.png';
import inFlowMoney from '@/src/assets/busi/performanceAnalysis/tradeAnalysisNew/inflow_money.png';
import moneyIcon from '@/src/assets/busi/performanceAnalysis/tradeAnalysisNew/money.png';
import netMoney from '@/src/assets/busi/performanceAnalysis/tradeAnalysisNew/net_money.png';
import number from '@/src/assets/busi/performanceAnalysis/tradeAnalysisNew/number.png';
import outFlow from '@/src/assets/busi/performanceAnalysis/tradeAnalysisNew/outflow.png';
import outFlowMoney from '@/src/assets/busi/performanceAnalysis/tradeAnalysisNew/outflow_money.png';
import rank from '@/src/assets/busi/performanceAnalysis/yiledPerformance/ranking.png';
import incomeRate from '@/src/assets/busi/performanceAnalysis/yiledPerformance/income_rate.png';
import iconOne from '@/src/assets/busi/PortfolioManagement/portfolioDefinition/icon1.png';
import iconTwo from '@/src/assets/busi/PortfolioManagement/portfolioDefinition/icon2.png';
import iconThree from '@/src/assets/busi/PortfolioManagement/portfolioDefinition/icon3.png';
import pass from '@/src/assets/busi/PortfolioManagement/pass.png';
import noPass from '@/src/assets/busi/PortfolioManagement/noPass.png';
import warn from '@/src/assets/busi/reportingServices/manBankReport/warn.png';
import goIcon from '@/src/assets/busi/Product/go.png';
import huIcon from '@/src/assets/busi/Product/hu.png';
import tickIcon from '@/src/assets/busi/reportingServices/tick_icon.png';
import crossIcon from '@/src/assets/busi/reportingServices/cross_icon.png';
import enterArrow from '@/src/assets/busi/securityMnt/enter_arrow.png';
import outArrow from '@/src/assets/busi/securityMnt/out_arrow.png';
import downloadVideo from '@/src/assets/busi/systemManagement/systemVedio/downloadVideo.png';
import video from '@/src/assets/busi/systemManagement/systemVedio/video.png';
import successIcon from '@/src/assets/busi/systemManagement/valuationAnalysis/icon_success.png';
import failureIcon from '@/src/assets/busi/systemManagement/valuationAnalysis/icon_failure.png';
import applyIcon from '@/src/assets/busi/systemManagement/valuationAnalysis/icon_applying.png';
import eventIcon from '@/src/assets/busi/userView/event_icon.png';
import investmentIcon from '@/src/assets/busi/userView/investment_icon.png';
import marketIcon from '@/src/assets/busi/userView/market_icon.png';
import publishIcon from '@/src/assets/busi/userView/publish.png';
import timeIcon from '@/src/assets/busi/userView/time.png';
import tipsIcon from '@/src/assets/busi/userView/tips_icon.png';
import productTitle from '@/src/assets/busi/workStation/Barra/product_titile_icon.png';
import ptrialTitle from '@/src/assets/busi/workStation/Barra/trial_titile_icon.png';
import userView from '@/src/assets/busi/workStation/Barra/userView_info_icon.png';
import userViewManage from '@/src/assets/busi/workStation/Barra/userView_manage_icon.png';
import userViewTip from '@/src/assets/busi/workStation/Barra/userView_tip_icon.png';
import holdTitle from '@/src/assets/busi/workStation/Barra/hold_titile_icon.png';
import infoTitle from '@/src/assets/busi/workStation/Barra/info_titile_icon.png';
import marketTitle from '@/src/assets/busi/workStation/Barra/market_titile_icon.png';
import analysisTitle from '@/src/assets/busi/workStation/Barra/analysis_titile_icon.png';
import barraProduct from '@/src/assets/busi/workStation/Barra/barra_product_icon.png';
import clear from '@/src/assets/frame/clear.png';
import noticeIcon from '@/src/assets/frame/noticeIcon.png';
import toolIcon from '@/src/assets/frame/tool.png';
import assetSplit from '@/src/assets/menu/asset-split.png';
import assetSplitB from '@/src/assets/menu/asset-split-b.png';
import composite from '@/src/assets/menu/composite.png';
import compositeB from '@/src/assets/menu/composite-b.png';
import derivativesManagement from '@/src/assets/menu/derivatives-management.png';
import derivativesManagementB from '@/src/assets/menu/derivatives-management-b.png';
import inventoryMnt from '@/src/assets/menu/inventory-mnt.png';
import inventoryMntB from '@/src/assets/menu/inventory-mnt-b.png';
import management from '@/src/assets/menu/management.png';
import managementB from '@/src/assets/menu/management-b.png';
import marketAnalysis from '@/src/assets/menu/market-analysis.png';
import marketAnalysisB from '@/src/assets/menu/market-analysis-b.png';
import menuManage from '@/src/assets/menu/menu-manage.png';
import menuManageB from '@/src/assets/menu/menu-manage-b.png';
import operational from '@/src/assets/menu/operational.png';
import operationalB from '@/src/assets/menu/operational-b.png';
import performanceAnalysis from '@/src/assets/menu/performance-analysis.png';
import performanceAnalysisB from '@/src/assets/menu/performance-analysis-b.png';
import portfolioBuild from '@/src/assets/menu/portfolio-build.png';
import portfolioBuildB from '@/src/assets/menu/portfolio-build-b.png';
import processManagement from '@/src/assets/menu/process-management.png';
import processManagementB from '@/src/assets/menu/process-management-b.png';
import proposal from '@/src/assets/menu/proposal.png';
import proposalB from '@/src/assets/menu/proposal-b.png';
import reportingServices from '@/src/assets/menu/reporting-services.png';
import reportingServicesB from '@/src/assets/menu/reporting-services-b.png';
import riskAnalysis from '@/src/assets/menu/risk-analysis.png';
import riskAnalysisB from '@/src/assets/menu/risk-analysis-b.png';
import riskMonitor from '@/src/assets/menu/risk-monitor.png';
import riskMonitorB from '@/src/assets/menu/risk-monitor-b.png';
import securityMnt from '@/src/assets/menu/security-mnt.png';
import securityMntB from '@/src/assets/menu/security-mnt-b.png';
import systemManagement from '@/src/assets/menu/system-management.png';
import systemManagementB from '@/src/assets/menu/system-management-b.png';
import tradeInstruction from '@/src/assets/menu/trade-instruction.png';
import tradeInstructionB from '@/src/assets/menu/trade-instruction-b.png';
import userManage from '@/src/assets/menu/user-manage.png';
import userManageB from '@/src/assets/menu/user-manage-b.png';
import researchManage from '@/src/assets/menu/research-manage.png';
import researchManageB from '@/src/assets/menu/research-manage-b.png';
import assetPricing from '@/src/assets/menu/asset-pricing.png';
import assetPricingB from '@/src/assets/menu/asset-pricing-b.png';
import bookManage from '@/src/assets/menu/book-manage.png';
import bookManageB from '@/src/assets/menu/book-manage-b.png';
import OperationManagement from '@/src/assets/menu/OperationManagement-b.png';
import OperationManagementB from '@/src/assets/menu/OperationManagement.png';
import stressTest from '@/src/assets/menu/stressTest-b.png';
import stressTestB from '@/src/assets/menu/stressTest.png';
import operate from '@/src/assets/menu/operate.png';
import operateB from '@/src/assets/menu/operate-b.png';
import amountSumBg from '@/src/assets/busi/InvestmentManage/stockGroupOrder/amount_sum_bg.png';
import stockBg from '@/src/assets/busi/InvestmentManage/stockGroupOrder/stock_bg.png';
import weigthBg from '@/src/assets/busi/InvestmentManage/stockGroupOrder/weigth_bg.png';
import addNew from '@/src/assets/icon/add.png';
import addNewSelect from '@/src/assets/icon/addSelect.png';
import editNewDisabled from '@/src/assets/icon/edit3.png';
import editNew from '@/src/assets/icon/edit3Select.png';
import refresh from '@/src/assets/icon/refresh.png';
import refreshSelect from '@/src/assets/icon/refreshSelect.png';
import illustrate from '@/src/assets/icon/illustrate.png';
import oneArrowDown from '@/src/assets/icon/oneArrowDown.png';
import oneArrowUp from '@/src/assets/icon/oneArrowUp.png';
import oneArrowDownSelect from '@/src/assets/icon/oneArrowDownSelect.png';
import oneArrowUpSelect from '@/src/assets/icon/oneArrowUpSelect.png';
import threeArrowsDown from '@/src/assets/icon/threeArrowsDown.png';
import threeArrowsUp from '@/src/assets/icon/threeArrowsUp.png';
import threeArrowsDownSelect from '@/src/assets/icon/threeArrowsDownSelect.png';
import threeArrowsUpSelect from '@/src/assets/icon/threeArrowsUpSelect.png';
import addBlueNew from '@/src/assets/icon/addBlue.png';
import addBlueNewSelect from '@/src/assets/icon/addBlueSelect.png';
import aquareCombination from '@/src/assets/icon/aquareCombination.png';
import medal from '@/src/assets/icon/medal.png';
import person from '@/src/assets/icon/person.png';
import medalSelect from '@/src/assets/icon/medalSelect.png';
import personSelect from '@/src/assets/icon/personSelect.png';
import deleteNew from '@/src/assets/icon/deleteNew.png';
import otherIcon from '@/src/assets/icon/otherIcon.png';
import arrowBlueDown from '@/src/assets/icon/arrowBlueDown.png';
import doubleDownArrowDisabled from '@/src/assets/icon/doubleDownArrow.png';
import editNewIconDisabled from '@/src/assets/icon/editNewDisabled.png';

import { Tooltip } from 'antd';

class IconC extends React.Component {
  // 默认值
  static defaultProps = {
    type: '', // 默认无图标类型
    onClick: () => {}, // 默认无点击事件
    style: {}, // 样式
    className: '', // 类名
    isHover: true, // 鼠标悬停是否更换图标，默认true
    placement: 'top', // tooltip 显示位置 top left right bottom topLeft topRight bottomLeft bottomRight leftTop leftBottom rightTop rightBottom
    title: undefined, // tooltip 显示内容
    isDisabled: false, // 是否禁用  默认否
    iconType: '', // 不传默认14×14，传original为原始大小
    isSelect: false, // 是否选中
  };

  state = {
    hoverState: false, // 判断鼠标是否移入图标
    iconTypeSummary: [
      { type: 'editNewIcon', Icon: editHoverIcon, IconHover: editHoverIcon, IconDisabled: editNewIconDisabled }, // 其他图标
      { type: 'arrowBlueDown', Icon: arrowBlueDown, IconHover: arrowBlueDown }, // 其他图标
      { type: 'otherIcon', Icon: otherIcon, IconHover: otherIcon }, // 其他图标
      { type: 'deleteNew', Icon: deleteHoverIcon, IconHover: deleteHoverIcon, IconDisabled: deleteNew }, // 有禁用删除
      { type: 'person', Icon: person, IconHover: person, IconSelect: personSelect }, // 个人图标
      { type: 'medal', Icon: medal, IconHover: medal, IconSelect: medalSelect }, // 勋章图标
      { type: 'aquareCombination', Icon: aquareCombination, IconHover: aquareCombination }, // 方形组合
      { type: 'addBlueNew', Icon: addBlueNew, IconHover: addBlueNew, IconSelect: addBlueNewSelect }, // 有背景色新增

      { type: 'threeArrowsUp', Icon: threeArrowsUpSelect, IconHover: threeArrowsUpSelect, IconDisabled: threeArrowsUp }, // 三个箭头向上
      { type: 'threeArrowsDown', Icon: threeArrowsDownSelect, IconHover: threeArrowsDownSelect, IconDisabled: threeArrowsDown }, // 三个箭头向下
      { type: 'oneArrowUp', Icon: oneArrowUpSelect, IconHover: oneArrowUpSelect, IconDisabled: oneArrowUp }, // 一个箭头向上
      { type: 'oneArrowDown', Icon: oneArrowDownSelect, IconHover: oneArrowDownSelect, IconDisabled: oneArrowDown }, // 一个箭头向下
      { type: 'illustrate', Icon: illustrate, IconHover: illustrate }, // 说明
      { type: 'refresh', Icon: refresh, IconHover: refresh, IconSelect: refreshSelect }, // 刷新
      { type: 'editNew', Icon: editNew, IconHover: editNew, IconDisabled: editNewDisabled }, // 新增
      { type: 'addNew', Icon: addNew, IconHover: addNew, IconSelect: addNewSelect }, // 新增
      { type: 'edit', Icon: edit, IconHover: editHoverIcon }, // 编辑
      { type: 'delete', Icon: deleteIcon, IconHover: deleteHoverIcon }, // 删除
      { type: 'deleteRed', Icon: deleteRed, IconHover: deleteRed, IconDisabled: deleteDisbaled }, // 删除红色
      { type: 'download', Icon: downloadIcon, IconHover: downloadHoverIcon }, // 下载
      { type: 'upRegulate', Icon: upRegulate, IconHover: upRegulate }, // 上调
      { type: 'downRegulate', Icon: downRegulate, IconHover: downRegulate }, // 下调
      { type: 'packUp', Icon: packUp, IconHover: packUp }, // 收起
      { type: 'newly', Icon: newly, IconHover: newly }, // 新增
      { type: 'cancle', Icon: cancle, IconHover: cancle }, // 取消
      { type: 'save', Icon: save, IconHover: save }, // 保存
      { type: 'rateMessage', Icon: rateMessage, IconHover: rateMessage }, // 汇率信息
      { type: 'rateMessageRightArrow', Icon: rateMessageRightArrow, IconHover: rateMessageRightArrow }, // 汇率信息-箭头
      { type: 'money', Icon: money, IconHover: money }, // 金额
      { type: 'minus', Icon: minus, IconHover: minus }, // 减
      { type: 'plus', Icon: plus, IconHover: plus }, // 加
      { type: 'info', Icon: info, IconHover: info }, // 提示信息
      { type: 'editWarning', Icon: editIconWarning, IconHover: editIconWarning }, // 编辑橙色
      { type: 'delWarning', Icon: delIconWarning, IconHover: delIconWarning }, // 删除橙色
      { type: 'arrow', Icon: arrow, IconHover: arrow }, // 收起
      { type: 'search', Icon: search, IconHover: search }, // 搜索/查询
      { type: 'account', Icon: account, IconHover: account, IconDisabled: accountDisbaled }, // 计算器
      { type: 'filter', Icon: filterIcon, IconHover: filterHoverIcon }, // 表格筛选过滤
      { type: 'saveIcon', Icon: saveIcon, IconHover: saveIcon, IconDisabled: saveIconDisabled },
      { type: 'downBtn', Icon: downBtn, IconHover: downBtn }, // 向下展开
      { type: 'play', Icon: play, IconHover: playHover }, // 播放
      { type: 'videoBtn', Icon: videoBtn, IconHover: videoBtn }, // 视频
      { type: 'doubleDownArrow', Icon: doubleDownArrow, IconHover: doubleDownArrow, IconDisabled: doubleDownArrowDisabled }, // 双层箭头
      {
        type: 'titleIcon',
        Icon: this.props.titleColor === 'red' ? titleIconRed : this.props.titleColor === 'darkBlue' ? titleIconDarkBlue : titleIcon,
        IconHover: this.props.titleColor === 'red' ? titleIconRed : this.props.titleColor === 'darkBlue' ? titleIconDarkBlue : titleIcon,
      }, // 一级标题图标
      {
        type: 'titleIconTwo',
        Icon: this.props.titleColor === 'red' ? titleIconTwoRed : this.props.titleColor === 'darkBlue' ? titleIconTwoDarkBlue : titleIconTwo,
        IconHover: this.props.titleColor === 'red' ? titleIconTwoRed : this.props.titleColor === 'darkBlue' ? titleIconTwoDarkBlue : titleIconTwo,
      }, // 二级标题图标
      { type: 'titleIconThree', Icon: titleIconThree, IconHover: titleIconThree }, // 三级标题图标
      { type: 'excelIcon', Icon: excelIcon, IconHover: excelIcon }, // excel
      { type: 'imageIcon', Icon: imageIcon, IconHover: imageIcon }, // 图片
      { type: 'pdfIcon', Icon: pdfIcon, IconHover: pdfIcon }, // pdf
      { type: 'unknownIcon', Icon: unknownIcon, IconHover: unknownIcon }, // 未知文件
      { type: 'videoIcon', Icon: videoIcon, IconHover: videoIcon }, // 视频
      { type: 'wordIcon', Icon: wordIcon, IconHover: wordIcon }, // word
      { type: 'zipIcon', Icon: zipIcon, IconHover: zipIcon }, // 压缩包
      { type: 'buyIcon', Icon: buyIcon, IconHover: buyIcon }, // 买
      { type: 'sellIcon', Icon: sellIcon, IconHover: sellIcon }, // 卖
      { type: 'downArrowGreen', Icon: downArrowGreen, IconHover: downArrowGreen }, // 向下箭头
      { type: 'upArrowRed', Icon: upArrowRed, IconHover: upArrowRed }, // 向上箭头
      { type: 'squareDownArrow', Icon: squareDownArrow, IconHover: squareDownArrow, IconSelect: squareDownArrowSelect }, // 向下展开
      { type: 'squareUpArrow', Icon: squareUpArrow, IconHover: squareUpArrow, IconSelect: squareUpArrowSelect }, // 向上展开
      { type: 'greater', Icon: greater, IconHover: greater }, // 大于
      { type: 'less', Icon: less, IconHover: less }, // 小于
      { type: 'leftArrow', Icon: leftArrowSelect, IconHover: leftArrowSelect, IconDisabled: leftArrow }, // 向左单箭头
      { type: 'rightArrow', Icon: rightArrowSelect, IconHover: rightArrowSelect, IconDisabled: rightArrow }, // 向右单箭头
      { type: 'deleteBlueTwo', Icon: deleteBlueTwo, IconHover: deleteBlueTwo }, // 蓝色删除
      { type: 'editBlueTwo', Icon: editBlueTwo, IconHover: editBlueTwo }, // 蓝色编辑
      { type: 'notice', Icon: notice, IconHover: notice }, // 喇叭
      { type: 'position', Icon: position, IconHover: position }, // 定位
      { type: 'goldenOne', Icon: goldenOne, IconHover: goldenOne }, // 金色第一
      { type: 'goldenTwo', Icon: goldenTwo, IconHover: goldenTwo }, // 金色第二
      { type: 'goldenThree', Icon: goldenThree, IconHover: goldenThree }, // 灰色第三
      { type: 'greyOne', Icon: greyOne, IconHover: greyOne }, // 灰色第一
      { type: 'greyTwo', Icon: greyTwo, IconHover: greyTwo }, // 灰色第二
      { type: 'greyThree', Icon: greyThree, IconHover: greyThree }, // 灰色第三
      { type: 'rank', Icon: rank, IconHover: rank }, // 排名
      { type: 'incomeRate', Icon: incomeRate, IconHover: incomeRate }, // 率
      { type: 'pass', Icon: pass, IconHover: pass }, // 通过
      { type: 'noPass', Icon: noPass, IconHover: noPass }, // 不通过
      { type: 'warn', Icon: warn, IconHover: warn }, // 警告
      { type: 'tickIcon', Icon: tickIcon, IconHover: tickIcon }, // √
      { type: 'crossIcon', Icon: crossIcon, IconHover: crossIcon }, // ×
      { type: 'successIcon', Icon: successIcon, IconHover: successIcon }, // 成功
      { type: 'failureIcon', Icon: failureIcon, IconHover: failureIcon }, // 失败
      { type: 'applyIcon', Icon: applyIcon, IconHover: applyIcon }, // 提示
      { type: 'productTitle', Icon: productTitle, IconHover: productTitle }, // 方形图标
      { type: 'ptrialTitle', Icon: ptrialTitle, IconHover: ptrialTitle }, // 三角图标
      { type: 'userView', Icon: userView, IconHover: userView }, // 用户视图
      { type: 'userViewManage', Icon: userViewManage, IconHover: userViewManage }, // 用户视图管理
      { type: 'userViewTip', Icon: userViewTip, IconHover: userViewTip }, // 用户视图提示
      { type: 'holdTitle', Icon: holdTitle, IconHover: holdTitle }, // 半圆图标
      { type: 'infoTitle', Icon: infoTitle, IconHover: infoTitle }, // 长方形
      { type: 'marketTitle', Icon: marketTitle, IconHover: marketTitle }, // 排行
      { type: 'analysisTitle', Icon: analysisTitle, IconHover: analysisTitle }, // 分析
      { type: 'barraProduct', Icon: barraProduct, IconHover: barraProduct }, // 圆形
      { type: 'clear', Icon: clear, IconHover: clear }, // 清除
      { type: 'noticeIcon', Icon: noticeIcon, IconHover: noticeIcon }, // 公告
      { type: 'toolIcon', Icon: toolIcon, IconHover: toolIcon }, // 工具
      { type: 'toolTipEdit', Icon: toolTipEdit, IconHover: toolTipEdit }, // 新增
      { type: 'downArrow', Icon: downArrow, IconHover: downArrow }, // 下调
      { type: 'upArrow', Icon: upArrow, IconHover: upArrow }, // 上调
      { type: 'addBlue', Icon: addBlue, IconHover: addBlue }, // 加
      { type: 'deleteYellow', Icon: deleteYellow, IconHover: deleteYellow }, // 减
      { type: 'liabilityRatio', Icon: liabilityRatio, IconHover: liabilityRatio },
      { type: 'share', Icon: share, IconHover: share },
      { type: 'value', Icon: value, IconHover: value },
      { type: 'vsIcon', Icon: vsIcon, IconHover: vsIcon },
      { type: 'defaultColor', Icon: defaultColor, IconHover: defaultColor, IconSelect: defaultColorSelect }, // 默认颜色模板
      { type: 'darkBlue', Icon: darkBlue, IconHover: darkBlue, IconSelect: darkBlueSelect }, // 深蓝色模板
      { type: 'redColor', Icon: redColor, IconHover: redColor, IconSelect: redColorSelect }, // 红色模板
      { type: 'inFlow', Icon: inFlow, IconHover: inFlow },
      { type: 'inFlowMoney', Icon: inFlowMoney, IconHover: inFlowMoney },
      { type: 'moneyIcon', Icon: moneyIcon, IconHover: moneyIcon },
      { type: 'netMoney', Icon: netMoney, IconHover: netMoney },
      { type: 'number', Icon: number, IconHover: number },
      { type: 'outFlow', Icon: outFlow, IconHover: outFlow },
      { type: 'outFlowMoney', Icon: outFlowMoney, IconHover: outFlowMoney },
      { type: 'iconOne', Icon: iconOne, IconHover: iconOne },
      { type: 'iconTwo', Icon: iconTwo, IconHover: iconTwo },
      { type: 'iconThree', Icon: iconThree, IconHover: iconThree },
      { type: 'goIcon', Icon: goIcon, IconHover: goIcon },
      { type: 'enterArrow', Icon: enterArrow, IconHover: enterArrow },
      { type: 'outArrow', Icon: outArrow, IconHover: outArrow },
      { type: 'downloadVideo', Icon: downloadVideo, IconHover: downloadVideo },
      { type: 'video', Icon: video, IconHover: video },
      { type: 'eventIcon', Icon: eventIcon, IconHover: eventIcon },
      { type: 'investmentIcon', Icon: investmentIcon, IconHover: investmentIcon },
      { type: 'marketIcon', Icon: marketIcon, IconHover: marketIcon },
      { type: 'publishIcon', Icon: publishIcon, IconHover: publishIcon },
      { type: 'timeIcon', Icon: timeIcon, IconHover: timeIcon },
      { type: 'tipsIcon', Icon: tipsIcon, IconHover: tipsIcon },
      { type: 'assetSplit', Icon: assetSplit, IconHover: assetSplit, IconSelect: assetSplitB },
      { type: 'composite', Icon: composite, IconHover: composite, IconSelect: compositeB },
      { type: 'derivativesManagement', Icon: derivativesManagement, IconHover: derivativesManagement, IconSelect: derivativesManagementB },
      { type: 'inventoryMnt', Icon: inventoryMnt, IconHover: inventoryMnt, IconSelect: inventoryMntB },
      { type: 'management', Icon: management, IconHover: management, IconSelect: managementB },
      { type: 'marketAnalysis', Icon: marketAnalysis, IconHover: marketAnalysis, IconSelect: marketAnalysisB },
      { type: 'menuManage', Icon: menuManage, IconHover: menuManage, IconSelect: menuManageB },
      { type: 'operational', Icon: operational, IconHover: operational, IconSelect: operationalB },
      { type: 'performanceAnalysis', Icon: performanceAnalysis, IconHover: performanceAnalysis, IconSelect: performanceAnalysisB },
      { type: 'portfolioBuild', Icon: portfolioBuild, IconHover: portfolioBuild, IconSelect: portfolioBuildB },
      { type: 'processManagement', Icon: processManagement, IconHover: processManagement, IconSelect: processManagementB },
      { type: 'proposal', Icon: proposal, IconHover: proposal, IconSelect: proposalB },
      { type: 'reportingServices', Icon: reportingServices, IconHover: reportingServices, IconSelect: reportingServicesB },
      { type: 'riskAnalysis', Icon: riskAnalysis, IconHover: riskAnalysis, IconSelect: riskAnalysisB },
      { type: 'riskMonitor', Icon: riskMonitor, IconHover: riskMonitor, IconSelect: riskMonitorB },
      { type: 'securityMnt', Icon: securityMnt, IconHover: securityMnt, IconSelect: securityMntB },
      { type: 'systemManagement', Icon: systemManagement, IconHover: systemManagement, IconSelect: systemManagementB },
      { type: 'tradeInstruction', Icon: tradeInstruction, IconHover: tradeInstruction, IconSelect: tradeInstructionB },
      { type: 'userManage', Icon: userManage, IconHover: userManage, IconSelect: userManageB },
      { type: 'researchManage', Icon: researchManage, IconHover: researchManage, IconSelect: researchManageB },
      { type: 'assetPricing', Icon: assetPricing, IconHover: assetPricing, IconSelect: assetPricingB },
      { type: 'bookManage', Icon: bookManage, IconHover: bookManage, IconSelect: bookManageB },
      { type: 'OperationManagement', Icon: OperationManagement, IconHover: OperationManagement, IconSelect: OperationManagementB },
      { type: 'stressTest', Icon: stressTest, IconHover: stressTest, IconSelect: stressTestB },
      { type: 'operate', Icon: operate, IconHover: operate, IconSelect: operateB },
      { type: 'amountSumBg', Icon: amountSumBg, IconHover: amountSumBg },
      { type: 'stockBg', Icon: stockBg, IconHover: stockBg },
      { type: 'weigthBg', Icon: weigthBg, IconHover: weigthBg },
      { type: 'doneBg', Icon: doneBg, IconHover: doneBg },
      { type: 'kzzsh', Icon: kzzsh, IconHover: kzzsh },
      { type: 'xptx', Icon: xptx, IconHover: xptx },
      { type: 'xqtx', Icon: xqtx, IconHover: xqtx },
      { type: 'zqyctx', Icon: zqyctx, IconHover: zqyctx },
    ], // 图标类型汇总
  };

  // 鼠标移入
  onMouseOver = () => {
    this.setState({
      hoverState: true,
    });
  };

  // 鼠标移出
  onMouseOut = () => {
    this.setState({
      hoverState: false,
    });
  };

  render() {
    const { type, style, className, onClick, isHover, title, placement, isDisabled, iconType, isSelect, hoverAfter } = this.props;
    const { iconTypeSummary } = this.state;
    return (
      <Tooltip placement={placement} title={title}>
        <img
          className={className}
          style={
            iconType === 'original'
              ? { cursor: isDisabled ? 'not-allowed' : 'pointer', ...style }
              : { width: '14px', height: '14px', lineHeight: '14px', cursor: isDisabled ? 'not-allowed' : 'pointer', ...style }
          }
          alt=''
          src={iconTypeSummary
            .map((item) => {
              if (item.type === type) {
                return isSelect
                  ? item.IconSelect
                  : isDisabled
                  ? item.IconDisabled
                  : isHover
                  ? this.state.hoverState
                    ? item.IconHover
                    : item.Icon
                  : hoverAfter
                  ? item.IconHover
                  : item.Icon;
              }
              return null;
            })
            .filter((item) => item != null)}
          onClick={(e) => {
            e.stopPropagation(); // 阻止冒泡
            // 抛出iconId
            !isDisabled && onClick();
          }}
          onMouseOver={this.onMouseOver}
          onMouseOut={this.onMouseOut}
        />
      </Tooltip>
    );
  }
}
// props默认值
IconC.propsTypes = {
  type: PropTypes.string, // 图标类型
  onClick: PropTypes.func, // 按钮点击事件
  style: PropTypes.object, // 样式
  className: PropTypes.string, // 类名
  isHover: PropTypes.bool, // 鼠标悬停是否更换图标
  isDisabled: PropTypes.bool, // 是否禁用
  isSelect: PropTypes.bool, // 是否选中
  iconType: PropTypes.string, // 默认为14×14 传original的时候为原始大小
  title: PropTypes.string, // tooltip
  titleColor: PropTypes.string, // 给标题图标传参数  不传参为常规蓝色，red为红色，darkBlue深蓝色
  hoverAfter: PropTypes.bool, // 是否展示悬停之后的静态图标  false为悬停前，true为悬停后
};
export default IconC;
